Associating Existing Models |
|
Before you begin this task:
You can associate the models in an XForm if it contains more than one model.
The models in an XForm are the components that hold and manage data. A model manages data requests, stores the response data, and synchronizes the changes made to the data with the backend.
If multiple models in an XForm are interdependent for data inputs such that the values from one are used as the input for another, you can associate the models.
In XForms with associated models, when you specify a value as the input for a field, the application will automatically retrieve and display other related information. This is possible as, at the backend, the models in the XForm are associated using common parameters that enable the exchange of data, and thus define the relationship between the models.
- Open the XForm in the XForms Designer.
- Add a Web service operation to the XForm. See Creating XForms using Web Services for details. A Web service operation is added to the XForm and the relevant interface is generated.
- Click (Manage Models) on the toolbar.
Note:
The Manage Models icon ( ) is available only in the advanced toolbar of the XForms Designer. Check Advanced in the toolbar, to view it. - Click . An empty row is added in the Manage Models window and the Model Properties dialog box appears.
- Select an option from the Parent Model drop-down list on the Associations tab to specify the model with which the current model is to be associated.
Restriction
- It is not possible to associate a model with itself.
- Models that do not have parameters available for association cannot be associated with other models.
- For each parameter, click in the Field column to display the Model References dialog box, and select an option to specify the field that is available for association in the current model.
- For each parameter, click in the Parent Model Field column to display the Model References dialog box, and select an option to specify the field of the parent model with which to associate.
Note:
The Parent Model Field column is editable only if a parent model is specified. - Click OK.
The details of the associated models are saved.